package com.pingpp.myndk;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class MyNDK extends AppCompatActivity {

    static {
        System.loadLibrary("MyJni-TestTest1");
        System.loadLibrary("MyJni-TestTest1");
    }

    public native String getStringFromNative();
    public native String getString_From_c();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_ndk);
        System.out.println(getStringFromNative());
    }

    public void btnClick(View view){
        System.out.println(getString_From_c());
        Toast.makeText(this, getStringFromNative(), Toast.LENGTH_LONG).show();
    }
}
